package com.jdzy.student.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jdzy.model.student.dtos.TagDTO;
import com.jdzy.model.student.pojos.Tag;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface TagMapper extends BaseMapper<Tag> {
    // 根据标签ID查询标签及其分类信息
//    @Select("SELECT t.*, tc.name AS categoryName FROM tag t LEFT JOIN tag_category tc ON t.category_id = tc.id WHERE t.id = #{id}")
    TagDTO getTagDTOById(@Param("id") Long id);
}
